#include "test1.h"
#include <cstdio>
#include <iostream>

using namespace std;


void test_int() {
	int i = 1; // 4ֽ位=32字节
	long j = 1; // ֽ4位=32字节
	short int m = 2; // 2位=16字节
	long int n = 3; // ֽ4位=32字节

	cout << "i=" << i << ", int's bytes:" << sizeof(i) << endl;
	cout << "j=" << j << ", long's bytes:" << sizeof(j) << endl;
	cout << "m=" << m << ", short int's bytes:" << sizeof(m) << endl;
	cout << "n=" << n << ", long int's bytes:" << sizeof(n) << endl;
}

void test_char() {
	char c = 'a';
	cout << "c=" << c << ", char bytes: " << sizeof(c) << endl;
}

void test_float() {
	float f = 0.11;
	cout << "f=" << f << ", float's bytes: " << sizeof(f) << endl;
}

void test_double() {
	double d = 0.22;
	cout << "d=" << d << ", double's bytes: " << sizeof(d) << endl;
}
